package Logic;

/**
 * Created by qq65827 on 2015/1/27.
 */

public class insertSort {


    public static void inset(int[] a) {
        for (int i = 2; i < a.length; i++) {
            if (a[i] < a[i - 1]) {
                a[0] = a[i];
                for (int j = i - 1; a[j] > a[0]; j--) {
                    a[j + 1] = a[j];
                }

                a[i] = a[0];
            }
        }
    }
}
